<?php

include './functions.php';
include './Db.php';

if(!isset($_SESSION['user_id'])){
	header("Location:./error.php");
}

$msg_id = $_GET['msg_id'];

$db = new Db('msg');

$msg = $db->find($msg_id);

if($_SESSION['user_id']!=$msg['uid']){
	header("Location:./error.php");
}


include './tpl/edit.html';
